package com.sec.springcloud.Feign;

import com.sec.springcloud.pojo.scinfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Controller
@FeignClient(value = "provider-crud",fallbackFactory =HystrxbackFactory.class)
public interface FergnServiceClient {
    //添加
    @PostMapping("/add/{name}")
    boolean add(@PathVariable("name") String name);

    //查询单个
    @GetMapping("/queryId/{id}")
    scinfo queryId(@PathVariable("id") Long id);


    @GetMapping("/query")
    List query();

}

